<template>
  <div class="home-panel">
    <div class="container">
      <div class="head">
        <h3>热门品牌<small>国际经典 品质保证</small></h3>
        <a
          class="disabled iconfont icon-angle-left prev"
          href="javascript:;"
        ></a
        ><a class="iconfont icon-angle-right next" href="javascript:;"></a>
      </div>
      <div class="box">
        <ul class="list" style="transform: translateX(0px)">
          <li v-for="(item, index) in arr3" :key="index">
            <a
              aria-current="page"
              href="#/"
              class="router-link-active router-link-exact-active"
              ><img :src="item.picture" alt
            /></a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      arr3: [],
    };
  },
  mounted() {
    var _this = this;
    axios({
      url: "http://pcapi-xiaotuxian-front-devtest.itheima.net/home/brand?limit=10",
      mounted: "get",
    }).then(function (res) {
      if (res.data.msg == "操作成功") {
        _this.arr3 = res.data.result;
        console.log(_this.arr3);
      }
    });
  },
};
</script>

<style lang="scss" >
.iconfont {
  line-height: 20px;
  width: 20px;
  height: 20px;
  background: #ccc;
  color: #fff;
  display: inline-block;
  text-align: center;
  margin-left: 5px;
  background: #27ba9b;
}
.box {
  display: flex;
  width: 100%;
  height: 345px;
  overflow: hidden;
  padding-bottom: 40px;
}
.box .list {
  width: 200%;
  display: flex;
  transition: all 1s;
}
.box .list li {
  margin-right: 10px;
  width: 240px;
}
.box .list li:nth-child(5n) {
  margin-right: 0;
}
.box .list li img {
  width: 240px;
  height: 305px;
}
.home-panel .head {
  padding: 40px 0;
  display: flex;
  align-items: flex-end;
}
.home-panel .head h3 {
  flex: 1;
  font-size: 32px;
  font-weight: 400;
  margin-left: 6px;
  height: 35px;
  line-height: 35px;
}
.home-panel .head h3 small {
margin-left: 20px;
font-size: 20px;
color: #ccc;
}
</style>